<?php
session_start();
?>
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="shortcut icon" href="../favicon.png">
 <script src="js/jquery.js"></script>
    <script src="js/bootstrap.min.js"></script>
    <script src="js/popover.js"></script>
    <script src="js/bootstrap-datepicker.js"></script>
    <script>
    $(function(){
    	$('a').tooltip({'placement':'right', 'trigger' : 'hover'});
    });
    </script>
    <title>Online Shopping</title>

    <!-- Bootstrap core CSS -->
    <link href="admin/css/bootstrap.css" rel="stylesheet">
    <link href="admin/css/datepicker.css" rel="stylesheet">
	<link href="admin/css/font-awesome.css" rel="stylesheet">
    <!-- Custom styles for this template -->
    <link href="admin/jumbotron.css" rel="stylesheet">

    <!-- Just for debugging purposes. Don't actually copy this line! -->
    <!--[if lt IE 9]><script src="../../js/ie8-responsive-file-warning.js"></script><![endif]-->

    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
      <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
    <![endif]-->
    
    </head>
    <body>
<div class="container">
    <div class="row">
    <?php 
    		if(isset($_SESSION['ERR_MSG']) && is_array($_SESSION['ERR_MSG']) && count($_SESSION['ERR_MSG'])>0){
    			
    			echo "<div class='alert alert-danger'>";
    			foreach ($_SESSION['ERR_MSG'] as $msg){
    				echo "<p>" . $msg . "</p>";
    			}
    			echo "</div>";
    			unset($_SESSION['ERR_MSG']);
    		}
    		if(isset($_SESSION['SUCCESS'])){
    			echo "<p>" . $_SESSION['SUCCESS'] . "</p>";
    		}
    		if(isset($_SESSION['SUCCESS_ERR'])){
    			echo "<p>" . $_SESSION['SUCCESS_ERR'] . "</p>";
    		}
    		if(isset($_SESSION['logout'])){
    			echo $_SESSION['logout'];
    		}
    		if(isset($_SESSION['need_login'])){
    			echo $_SESSION['need_login'];
    		}
    ?>
        <div class="col-xs-12 col-sm-12 col-md-4 well well-sm">
            <legend><a href="http://www.jquery2dotnet.com"><i class="fa fa-user"></i></a> Sign In!</legend>
            <form action="admin/controller/login_exec.php" method="post" class="form">
            
            <input class="form-control" name="youremail" placeholder="Your Email" type="email" />
            
            <input class="form-control" name="password" placeholder="New Password" type="password" />
            <button class="btn btn-lg btn-success btn-block" type="submit">
                Login!</button>
            </form>
        </div>
    </div>
</div>
</body>
</html>